package com.jt.demo22.aop;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Component
@Aspect
@Order(value = 1)
public class aRound {
    @Pointcut("bean(userServiceImpl)")
    public void pointCut(){
    }
    @Around(value = "pointCut()")
    public Object around(ProceedingJoinPoint point) throws Throwable {
        long l = System.currentTimeMillis();
        System.out.println("环绕2");
        Object proceed = point.proceed();
        System.out.println("环绕2");
        long l1 = System.currentTimeMillis();
        System.out.println("运行时间："+(l1-l));
        return "对第二个方法进行返回；";
    }
}
